﻿<controls:FloatableWindow x:Class="PrintScreens.RenewalSummaryScreen"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=FloatableWindow"
                          xmlns:local="clr-namespace:PrintScreens"
                          xmlns:sys="clr-namespace:System;assembly=mscorlib"
                          xmlns:data="clr-namespace:PrintScreens.Service.Printing"
                              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" 
                          d:DataContext="{d:DesignInstance Type=data:PrintingServiceFirstPage}"
           Width="1000" Height="400" 
           Title="Renewal Summary">
    <controls:FloatableWindow.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Styles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            <Style TargetType="TextBlock">
                <Setter Property="TextWrapping" Value="Wrap" />
            </Style>

        </ResourceDictionary>

    </controls:FloatableWindow.Resources>
    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <StackPanel>

            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="2*" />
                    <ColumnDefinition />
                    <ColumnDefinition />
                    <ColumnDefinition />
                    <ColumnDefinition />
                    <ColumnDefinition />
                    <ColumnDefinition />
                    <ColumnDefinition />
                    <ColumnDefinition />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <TextBlock Grid.Column="2" Grid.ColumnSpan="4">Costs</TextBlock>
                <TextBlock Grid.Column="6" Grid.ColumnSpan="4">Documents Required</TextBlock>

                <TextBlock Grid.Row="1">Member Name</TextBlock>
                <TextBlock Grid.Row="1" Grid.Column="1">Type</TextBlock>
                <TextBlock Grid.Row="1" Grid.Column="2">Rate</TextBlock>
                <TextBlock Grid.Row="1" Grid.Column="3">BCU</TextBlock>
                <TextBlock Grid.Row="1" Grid.Column="4">Racks</TextBlock>
                <TextBlock Grid.Row="1" Grid.Column="5">Total</TextBlock>
                <TextBlock Grid.Row="1" Grid.Column="6">Signed Renewal Form</TextBlock>
                <TextBlock Grid.Row="1" Grid.Column="7">Copy of BCU Card</TextBlock>
                <TextBlock Grid.Row="1" Grid.Column="8">Student Union Card/Proof of Unemployment</TextBlock>
                <TextBlock Grid.Row="1" Grid.Column="9">Parental Consent Form</TextBlock>

                <Line  X1="1" Stretch="Fill" VerticalAlignment="Bottom" Grid.ColumnSpan="10"/>
                <Line Grid.Row="1"  X1="1" Stretch="Fill" VerticalAlignment="Bottom" Grid.ColumnSpan="10"/>
                <Line Grid.Column="1"  Y1="1" Stretch="Fill" HorizontalAlignment="Right" Grid.RowSpan="3"/>
                <Line Grid.Column="5"  Y1="1" Stretch="Fill" HorizontalAlignment="Right" Grid.RowSpan="3"/>
                <ItemsControl Grid.ColumnSpan="10" Grid.Row="2" ItemsSource="{Binding Path=Members}">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="2*" />
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                <TextBlock Text="{Binding Path=FullName}"/>
                                <TextBlock Grid.Column="1" Text="{Binding Path=MembershipType}" />
                                <TextBlock Grid.Column="2" Text="{Binding Path=Rate, StringFormat=\{0:c\}}" />
                                <TextBlock Grid.Column="3" Text="{Binding Path=BCU, StringFormat=\{0:c\}}" />
                                <TextBlock Grid.Column="4" Text="{Binding Path=Racks, StringFormat=\{0:c\}}" />
                                <TextBlock Grid.Column="5" Text="{Binding Path=Total, StringFormat=\{0:c\}}" />
                                <CheckBox Grid.Column="6" IsChecked="{Binding Path=rqSignedRenewalForm}" />
                                <CheckBox Grid.Column="7" IsChecked="{Binding Path=rqBCUCard}" />
                                <CheckBox Grid.Column="8" IsChecked="{Binding Path=rqConcessionProof}" />
                                <CheckBox Grid.Column="9" IsChecked="{Binding Path=ParentalConsent}" />
                            </Grid>
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>
                <Border Grid.RowSpan="3" Grid.ColumnSpan="10" />
                <Border Grid.Row="3" Grid.Column="5">
                    <TextBlock Text="{Binding TotalMoney, StringFormat=\{0:c\}}" />
                </Border>
            </Grid>

            <!--<StackPanel>
                <TextBlock TextWrapping="Wrap">You have notasked to renew the following members and therefore cannot renew the racks they hold.  Please can you select a reason for not renewing their membership.</TextBlock>
            </StackPanel>
            <StackPanel>
                <TextBlock TextWrapping="Wrap">You have not asked to renew the folloiwing racks.  Please can you select a reason for not renewing.</TextBlock> 
            </StackPanel>-->
            <TextBlock>To Complete your membership renewal:</TextBlock>
            <ItemsControl>
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition />
                            </Grid.ColumnDefinitions>
                            <Ellipse Margin="5" Width="8" Height="8" VerticalAlignment="Top" Fill="Transparent" Stroke="Black"/>
                            <TextBlock Grid.Column="1" Text="{Binding }" TextWrapping="Wrap" Margin="0,0,0,0"></TextBlock>
                        </Grid>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
                <ItemsControl.Items>
                    <sys:String>Print your renewal forms</sys:String>
                    <sys:String>Sign the renewal forms where indicated</sys:String>
                    <sys:String>Make your cheque payable to "Shepperton Slalom Canoe Club"</sys:String>
                    <sys:String>Send the cheque and renewal forms together with any additional forms indicated above to the membership secretary (Dee Lindesay, 6 Oaklands Drive, Ascot, Berks, SL5 7NE</sys:String>
                </ItemsControl.Items>
            </ItemsControl>
        </StackPanel>
        <!--<Button x:Name="CancelButton" Content="Cancel" Click="CancelButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="1" />-->
        <local:Printer x:Name="PrinterBTN" Width="200" Height="100" HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="1"/>
        <!--<Button x:Name="OKButton" Content="OK" Click="OKButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,79,0" Grid.Row="1" />-->
    </Grid>
</controls:FloatableWindow>